
<template>
  home
  <button @click="jump">跳到test页面</button>
  <button @click="jumpSetup">跳到setup页面</button>
</template>
<script lang="ts">
import { useStore } from 'vuex'
import { useRouter } from 'vue-router'
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'Home',
  setup() {
    /*---使用vuex---*/
    const store = useStore()
    console.log(store.state.test)
    const router = useRouter()
    /*---使用router---*/
    const jump = () => {
      router.push('/test')
    }

    const jumpSetup = () => {
      router.push('/Setup')
    }

    return {
      jump,
      jumpSetup,
    }
  },
})
</script>

